using System;
using System.Xml.Serialization;
using System.Globalization;

namespace org.nativeinstruments.nml
{
	
	public class ALBUM
	{
		// ATTRIBUTES
		[XmlAttribute("TITLE")]
		public string TITLE { get; set; }
		
		[XmlIgnore]
		public int? OF_TRACKS { get; set; }
		[XmlAttribute("OF_TRACKS")]
		public string OF_TRACKSString
		{
			get { return OF_TRACKS==null ? null : OF_TRACKS.Value.ToString(CultureInfo.InvariantCulture); }
			set
			{
				if (String.IsNullOrWhiteSpace(value)) OF_TRACKS = null;
				else OF_TRACKS = int.Parse(value);
			}
		}
		
		[XmlIgnore]
		public int? TRACK { get; set; }
		[XmlAttribute("TRACK")]
		public string TRACKString
		{
			get { return TRACK==null ? null : TRACK.Value.ToString(CultureInfo.InvariantCulture); }
			set
			{
				if (String.IsNullOrWhiteSpace(value)) TRACK = null;
				else TRACK = int.Parse(value);
			}
		}
		
		// ELEMENTS
		[XmlText]
		public string Value { get; set; }
		
		// CONSTRUCTOR
		public ALBUM()
		{}
	}
}
